package com.HomeWorkhsp.Chapter07;

/**
 * Enjoy programming!!!
 * Time: 2021/11/9 -  20:32
 */
public class Test04 {
    public static void main(String[] args) {
        Circle c = new Circle(3.0);
        System.out.println(c.getPerimter(c.radius));
        System.out.println(c.getArea(c.radius));

    }
}

class Circle {
    double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getPerimter(double radius) {
        return 2 * radius * Math.PI;
    }
    public double getArea(double radius){
        return radius * radius * Math.PI;
    }
}
